package com.ssr.ld.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import com.ssr.ld.bean.BaseBean;
import com.ssr.ld.dao.BaseDao;
import com.ssr.ld.service.BaseService;


@Service
public abstract class BaseServiceImpl<T extends BaseBean> implements BaseService<T> {

	private BaseDao<T> baseDao;

	public BaseDao<T> getBaseDao() {
		return baseDao;
	}

	public void setBaseDao(BaseDao<T> baseDao) {
		this.baseDao = baseDao;
	}

	public void create(T e) {
		baseDao.create(e);
	}

	public void update(T e) {
		baseDao.update(e);
	}

	public void delete(T e) {
		baseDao.delete(e);
	}

	public T get(long id) {
		return baseDao.get(id);
	}

	public long count(T e) {
		return baseDao.count(e);
	}

	public List<T> queryByPage(T e) {
		return baseDao.queryByPage(e);
	}

	public List<T> query(T e) {
		return baseDao.query(e);
	}

}
